package com.anche.cywebnew.Utils.Cvr;

import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.NativeLong;
import com.sun.jna.win32.StdCallLibrary;

public interface CVRNetSDK extends StdCallLibrary {

    CVRNetSDK INSTANTCE = (CVRNetSDK) Native.loadLibrary("C:\\Program Files\\anche\\HikBaseCom\\CVRNetSDK", CVRNetSDK.class);

    /**
     * 初始化SDK
     *
     * @return
     */
    boolean NET_CVR_Init();

    boolean NET_CVR_Cleanup();

    NativeLong NET_CVR_Login(String sDVRIP, short wDVRPort, String sUserName, String sPassword);

    boolean NET_CVR_Logout(NativeLong lUserID);

    int NET_CVR_GetLastError();

    NativeLong NET_CVR_GetFileByTime(NativeLong lUserID, String lpStreamID, String lpStartTime, String lpStopTime, String sSavedFileName);

    int NET_CVR_GetDownloadPos(NativeLong lFileHandle);

    int NET_CVR_StopGetFile(NativeLong lFileHandle);

    NativeLong NET_CVR_UploadFile(NativeLong lUserID,String lpFilePath,String lpFileID,int iFileVolnumeID);

    int NET_CVR_GetUploadState(NativeLong lUploadHandle);

    String NET_CVR_GetUploadResult(NativeLong lUploadHandle);

    boolean NET_CVR_UploadClose(NativeLong lUploadHandle);
}
